//
//  View+.swift
//  SwiftuiZsa
//
//  Created by hccc on 2023/7/21.
//

import Foundation
import SwiftUI

extension View {
    func toAny() -> AnyView {
        AnyView(self)
    }
    public func paddingTop(_ value: CGFloat) -> some View {
        self.padding(.top, value)
    }
    public func paddingLeft(_ value: CGFloat) -> some View {
        self.padding(.leading, value)
    }
    public func paddingBottom(_ value: CGFloat) -> some View {
        self.padding(.bottom, value)
    }
    public func paddingRight(_ value: CGFloat) -> some View {
        self.padding(.trailing, value)
    }
    public func paddingHorizontal(_ value: CGFloat) -> some View {
        self.padding(.trailing, value)
            .padding(.leading, value)
    }
    public func paddingVerticol(_ value: CGFloat) -> some View {
        self.padding(.top, value)
            .padding(.bottom, value)
    }
}
